public class Test {
    public static void fun(Fly fly){
        fly.fly();
    }
    public static void fun2(Run run){
        run.run();
        run.swim();
        run.fly();
    }
    public static void main(String[] args) {
        Fly fly=new Bird("布谷",33);
        fun(fly);
        fun(new Bird("shab",2));
        System.out.println("-----------------------");
        fun2(new Dog("wnags",2));
        fun2(new Bird("sjsj",2));
    }
}
